<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>数组解构/赋值</title>
  <script type="text/javascript">
    let arr = [1, 2, 3];
    // 传统数组解构
    let x = arr[0], y = arr[1], z = arr[2];
    console.log(x, y, z);
    // ES6风格
    let [a, b, c] = arr;
    console.log(a, b, c);
    let [num1, num2, num3] = [11, 22, 33];
    console.log(num1, num2, num3);
  </script>
</head>
<body>
</body>
</html>
